#!/usr/bin/env bash 

###############[1panel]##########################
echo '安装1panel'
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh


########## install firewall manager###########
# 在1panel上开启防火墙，添加规则后重新开启，才能屏蔽外网攻击。
echo '安装防火墙ufw'
apt-get install ufw
# allow ssh
sudo ufw allow from  192.168.0.0/16 22/tcp
# allow 1panel
ufw allow 10001/tcp
ufw allow 445/tcp
ufw allow  from  192.168.0.0/16 proto tcp to any port 1:65535
ufw allow  from  192.168.0.0/16 proto udp to any port 1:65535
ufw allow  from  172.16.0.0/12 proto udp to any port 1:65535
ufw allow  from  172.16.0.0/12 proto udp to any port 1:65535
